package org.scaffold.config;

import de.tototec.cmdoption.handler.CmdOptionHandlerException;
import de.tototec.cmdoption.handler.StringFieldHandler;
import org.scaffold.utils.LogUtils;
import org.scaffold.velocity.TemplateUtils;

import java.io.*;
import java.lang.reflect.AccessibleObject;
import java.util.Properties;

/**
 * 保存路劲
 */
public class PathOptionConfigHandle extends StringFieldHandler implements CmdlineOptionConfig {
    @Override
    public void applyParams(Object config, AccessibleObject element, String[] args, String optionName) throws CmdOptionHandlerException {
        super.applyParams(config, element, args, optionName);
        try {
            this.config((GenerateConfig) config);
        } catch (Exception e) {
            throw new CmdOptionHandlerException(e.getMessage(), e, null);
        }
    }

    @Override
    public void config(GenerateConfig config) throws Exception {
        LogUtils.info("配置保存路径：");
    }

}
